import static org.junit.Assert.*;

import org.junit.Test;


public class CardTest {

	@Test(expected=BadugiException.class)
	public void testCard_SuitOutOfRange_Exception() throws BadugiException {
		Card card = new Card(5,5);
	}

	@Test(expected=BadugiException.class)
	public void testCard_ValueOutOfRange_Exception() throws BadugiException {
		Card card = new Card(15,2);
	}
	
	@Test(expected=BadugiException.class)
	public void testCard_ValueAndSuitOutOfRange_Exception() throws BadugiException {
		Card card = new Card(14,5);
	}
	
	@Test(expected=BadugiException.class)
	public void testCard_NegativeValueAndSuit_Exception() throws BadugiException {
		Card card = new Card(-1,-1);
	}
	
	@Test
	public void testCard_SmallestValueAndSuit_Success() throws BadugiException{
		try{
			Card card = new Card(1,1);
		}
		catch(BadugiException e){
			fail();
		}
	}
	
	@Test
	public void testCard_LargestValueAndSuit_Success() throws BadugiException{
		try{
			Card card = new Card(13,4);
		}
		catch(BadugiException e){
			fail();
		}
	}
	
}
